package com.hzw.saas.service.rbac.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzw.saas.service.rbac.model.Permission;
import com.hzw.saas.service.rbac.model.Role;
import com.hzw.saas.service.rbac.model.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author zzl
 * @Entity com.hzw.saas.service.rbac.model.UserRole
 * @since 08/30/2021
 */
@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {

    List<Role> listRoles(@Param("sys") Integer sys, @Param("userId") String userId);

    List<Permission> listPermissions(@Param("sys") Integer sys, @Param("userId") String userId, @Param("types") List<Integer> types);

    List<String> listPermissionIds(@Param("sys") Integer sys, @Param("userId") String userId);

    List<String> listAuthorities(@Param("sys") Integer sys, @Param("userId") String userId);

}




